From: Keir Fraser Date: Thu, 27 Sep 2007 16:44:03 +0000 (+0100) Subject: xend: fix server/netif.py so that it respects type=None. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14949^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cd76c0a1edd26aed8ad9bdb8144b20e0b335cea2;p=xen.git xend: fix server/netif.py so that it respects type=None. Signed-off-by: Daniel P. Berrange --- diff --git a/tools/python/xen/xend/server/netif.py b/tools/python/xen/xend/server/netif.py index fbf059b9fb..250fa848a0 100644 --- a/tools/python/xen/xend/server/netif.py +++ b/tools/python/xen/xend/server/netif.py @@ -115,17 +115,15 @@ class NetifController(DevController): accel = config.get('accel') sec_lab = config.get('security_label') - if not typ: - typ = xoptions.netback_type - if not mac: raise VmError("MAC address not specified or generated.") devid = self.allocateDeviceID() back = { 'script' : script, - 'mac' : mac, - 'type' : typ } + 'mac' : mac } + if typ: + back['type'] = typ if ipaddr: back['ip'] = ipaddr if bridge: